<template>
	<view class="detailBox">
		<view class="mart-30">
			<template v-if="thisData&&thisData.length">
			<view class="topContent readBox" v-for="(item,index) in thisData">
				
				<u-row gutter="0" class="marb-20">
					<u-col span="4" textAlign="center">
						<text class="label-name">检测单位</text>
					</u-col>
					<u-col span="6">
						<text class="label-name">{{item.checkUnit}}</text>
					</u-col>
				</u-row>
				<u-line class="marb-20"></u-line>
				<u-row gutter="0" class="marb-20">
					<u-col span="4" textAlign="center">
						<text class="label-name">检测人员</text>
					</u-col>
					<u-col span="6">
						<text class="label-name">{{item.checkUserName}}</text>
					</u-col>
				</u-row>
				<u-line class="marb-20"></u-line>
				<u-row gutter="0" class="marb-20">
					<u-col span="4" textAlign="center">
						<text class="label-name">检测日期</text>
					</u-col>
					<u-col span="6">
						<text class="label-name">{{item.checkDate|ymd}}</text>
					</u-col>
				</u-row>
				<u-line class="marb-20"></u-line>
				<u-row gutter="0" class="marb-20">
					<u-col span="4" textAlign="center">
						<text class="label-name">状态</text>
					</u-col>
					<u-col span="6">
						<text class="label-name">{{$enums.check_Status.Get(item.status).text}}</text>
					</u-col>
				</u-row>
				<u-line class="marb-20"></u-line>
				<u-row gutter="0" class="marb-20">
					<u-col span="4" textAlign="center">
						<text class="label-name">操作</text>
					</u-col>
					<u-col span="3" textAlign="center">
						<u-button type="warning" @click="onShowDetail(item)" size="small" text="详情"></u-button>
					</u-col>
				</u-row>
			</view>
			</template>
			<view v-else>
				<view class="topContent">
					<u-empty mode="data" text="暂无数据">
					</u-empty>
				</view>
			</view>
		
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				thisID: null,
				thisData: {},
			}
		},
		onLoad(options) {
			let that = this;
			// #ifdef APP-NVUE
			const eventChannel = this.$scope.eventChannel; // 兼容APP-NVUE
			// #endif

			// #ifndef APP-NVUE
			const eventChannel = this.getOpenerEventChannel();
			// #endif
			that.$refs.uReadMore.init();
		},
		beforeDestroy() {

		},
		methods: {
			onShowDetail(row) {
				let url = '/pages/ropeDetection/detail';
				uni.navigateTo({
					url: url,
					success: function(res) {
						res.eventChannel.emit('editData', {
							data: row,
							operateType: '详情'
						});
					}
				});
			},
			init(data) {
				this.thisData = data.checkWireropeModelList;
				return;
			},
		}
	}
</script>

<style>

</style>